package com.jzhao.jpre.model;

import org.springframework.dao.DataAccessException;

import com.jzhao.jpre.base.Assembler;
import com.jzhao.jpre.model.dao.AnsCodeDao;

public class TestAnsCode {
	public static void main(String[] args) {
		AnsCodeDao ansCodeDao = (AnsCodeDao) Assembler
				.getInstance("ansCodeDao");
		AnsCode ansCode = new AnsCode();
		try {
			ansCode = ansCodeDao.SelectByKey("110", "120");
			System.out.println("MrchCode = " + ansCode.getMrchCode());
			System.out.println("AnsCode = " + ansCode.getAnsCode());
			System.out.println("sysErrCode = " + ansCode.getSysErrCode());
			System.out.println("ansExpCn = " + ansCode.getAnsExpCn());
			System.out.println("ansExpEn = " + ansCode.getAnsExpEn());
		} catch (DataAccessException dae) {
			System.out.println("The record doesn't exist!");
			System.out.println(dae.getMessage());
		}
	}
}
